package com.gzone.contentprovider.utils;


import java.util.ArrayList;

import android.content.Context;

public class AndroidUtil {
	
	public static String[] getAssetFilesAsArray(Context context, String assetPath){
		 try {
			return context.getAssets().list(assetPath);
		} catch (Exception e) {
			return null;
		}
	}
	
	public static ArrayList<String> getAssetFiles(Context context, String assetPath){
		ArrayList<String> list = new ArrayList<String>();
		try {
			String[] array = context.getAssets().list(assetPath);
			for(int i = 0 ;i < array.length; i++){
				list.add(array[i]);
			}
			return list;
		} catch (Exception e) {
			return list;
		}
	}
	
	public static String getResouce(Context context, int resourceId){
		return context.getResources().getString(resourceId);
	}
	
}
